//
//  DYCNewViewController.m
//  DYCBaisi
//
//  Created by Yachao on 17/6/29.
//  Copyright © 2017年 Yachao. All rights reserved.
//

#import "DYCNewViewController.h"
#import "DYCSubTagViewController.h"
@interface DYCNewViewController ()

@end

@implementation DYCNewViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor greenColor];
    
    [self setupNavBar];
}


#pragma mark - 设置导航条
- (void)setupNavBar
{
    // 左边按钮
    // 把UIButton包装成UIBarButtonItem.就导致按钮点击区域扩大
    self.navigationItem.leftBarButtonItem = [UIBarButtonItem itemWithimage:[UIImage imageNamed:@"MainTagSubIcon"] highImage:[UIImage imageNamed:@"MainTagSubIconN"] target:self action:@selector(tagClick)];
    
    // 右边按钮
//    self.navigationItem.rightBarButtonItem = [UIBarButtonItem itemWithimage:[UIImage imageNamed:@"navigationButtonRandom"] highImage:[UIImage imageNamed:@"navigationButtonRandomClick"] target:self action:nil];
    
    // titleView
    self.navigationItem.titleView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"MainTitleN"]];
}

#pragma mark - 点击订阅标签调用
- (void)tagClick
{
    // 进入推荐标签界面
    DYCSubTagViewController *subTagVC = [[DYCSubTagViewController alloc] init];
    [self.navigationController pushViewController:subTagVC animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
